<#-- 导入变量定义文件 -->
<#include "../template/include/assign.ftl">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>相册管理</title>
<#-- 导入静态资源文件 -->
<#include "../template/include/source.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}

</style>
</head>
<#include "../template/template_listPage.ftl">
<script type="text/javascript">
$().ready( function() {
	<#if actionErrors??&&(actionErrors?size > 0)>
		$.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
		 modal: true, autoCloseTime: 3000});
	</#if>
	<#if actionMessages??&&(actionMessages?size > 0)>
			$.dialog({type: "success", content: "<#list actionMessages as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 5000});
		</#if>
		
		$('.follow-cursor').poshytip({
                    className: 'tip-darkgray',
	                followCursor: true,
	                slide: false
                });
});
 
 
 function deleteA(id){
	var submit = function (v, h, f) {
                if (v == 'ok')  {
                    var url="${web_base}/go/album!falseDelete.htm?id="+id;
                    document.forms[0].action=url;
					document.forms[0].submit();
                }  else if (v == 'cancel')  {

                }
                return true; //close
            };
     $.jBox.confirm("你确认要删除吗?", "温罄提示", submit);
 }
 
</script>
</head>
<body class="list">
	<div class="body">
		<div class="listBar">
			<h1><span class="icon">&nbsp;</span>相册管理&nbsp;<span class="pageInfo"></span></h1>
		</div>
		<@pageList page=(page!) id="list" action="${web_base}/go/album!list.htm" query="albumInfoQuery" isEmpty=true>
		<div class="operateBar">
		<input type="button" class="addButton" onclick="location.href='${web_base}/go/album!add.htm'" value="新增相册" />
				<label>查找:</label>
				相册名称:<input type="text" id="" name="albumInfoQuery.name" value="${(albumInfoQuery.name)!}" /> 
				发布时间:
				 <input type="text" id="startTime" name="albumInfoQuery.publishTimeStart"
                    onclick="WdatePicker({startDate:'%y',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')||\'%y-%M-%d\'}'})"
                           value="${(albumInfoQuery.publishTimeStart?string("yyyy-MM-dd HH:mm:ss"))!}" class="Wdate fixWidth" >
			<span>--</span><input type="text" id="endTime" name="albumInfoQuery.publishTimeEnd"
                   onclick="WdatePicker({startDate:'%y',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startTime\')}',maxDate:'%y-%M-%d'})"
                   value="${(albumInfoQuery.publishTimeEnd?string("yyyy-MM-dd HH:mm:ss"))!}" class="Wdate fixWidth">
                <input type="hidden" name="albumInfoQuery.orderBy" id="orderBy" value="${albumInfoQuery.orderBy}" />
				<input type="hidden" name="albumInfoQuery.orderType" id="order" value="${albumInfoQuery.orderType}" />
				<input type="submit" id="searchButton" class="searchButton" value="" />
			</div>
			<table class="listTable">
				<tr>
					<th>
						<span class="" name="id">编号</span>
					</th>
					<th>
						<span class="" name="name">相册名称</span>
					</th>
					<th>
						<span class="" name="">相册封面</span>
					</th>
					<th>
						<span class="" name="">归属月份</span>
					</th>
					<th>
						<span class="" name="">相册简介</span>
					</th>
					<th>
						<span class="" name="">支持人数</span>
					</th>
					<th>
						<span class="" name="">支持率</span>
					</th>
					<th>
						<span class="sort" name="publish_time">发布时间</span>
					</th>
					<th width="80">操作<th/>
				</tr>
				<#if  page??&&page.list??&&(page.list?size gt 0) >			
				<#list page.list as obj>
					<tr>
						<td>
							${(obj.id)!}
						</td>
						<td>
							<a class="follow-cursor" title="${(obj.name)!}" style="cursor: pointer;">
		                            <#if obj.name??>
		                            <#--//截取输出文字的长度-->
	                                    <#if obj.name?length lte 10 >
	                                   		${(obj.name)!}
	                                    <#else>
	                                    	${obj.name?substring(0,10)}...
	                                    </#if>
		                            </#if>
			                   </a>
						</td>
						<td>
							<img id="imgShow1" width="80" height="50" src="${(web_base + (obj.albumPath))!}" />
						</td>
						<td>
								${((obj.month)!)}
						</td>
						
						<td>
							<a class="follow-cursor" title="${(obj.introduction)!}" style="cursor: pointer;">
		                            <#if obj.introduction??>
		                            <#--//截取输出文字的长度-->
	                                    <#if obj.introduction?length lte 10 >
	                                   		${(obj.introduction)!}
	                                    <#else>
	                                    	${obj.introduction?substring(0,10)}...
	                                    </#if>
		                            </#if>
			                   </a>
						</td>
						<td>
							${(obj.supportNum)!}
						</td>
						<td>
							<#if obj.supportRate??>
								${obj.supportRate?string.percent}
							</#if>
						</td>
						<td>
							<#if obj.publishTime?exists&&obj.publishTime?is_date>
								${((obj.publishTime)!)?string("yyyy-MM-dd HH:mm:ss")}
							</#if>
						</td>
						<td width="80">
							 <span class="spanLink" onclick="deleteA('${(obj.id)!}')" title="删除">[删除]</span>
						</td>
					</tr>
				</#list>
				<#else>
				    <tr><td colspan="11">
					<div class="noRecord">
						没有找到任何记录!
					</div>	
					</td></tr>
				</#if>	
			</table>

		</@pageList>
	</div>
	
</body>
</html>